<template>
  <div>

  </div>
</template>

<script setup lang="ts">
import { isProxy, isReactive, isReadonly, isRef, reactive, readonly, ref } from 'vue';

let name = ref('孙悟空')
let age = reactive({
  age: 18
})
let sex = readonly({})
// isRef判断是否是一个ref对象
console.log(isRef(name), isRef(age))//true  false
// isReactive 判断是否是reactive
console.log(isReactive(name), isReactive(age))//false true
// isReadonly 判断是否是readonly创建的代理 
console.log(isReadonly(sex), isReadonly(name)); //true false
// isProxy判断reactive和readonly
console.log(isProxy(name), isProxy(age), isProxy(sex));//false true true

</script>

<style scoped></style>